package com.yanqu.road.server.cmd.wingroom;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.wingroom.WingRoomProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.wingroom.WingRoomModule;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_WING_ROOM_CROSS_CAL_EVENT_RED_DOT_FROM_CROSS, desc = "计算呼朋唤友事件红点")
public class CrossCalEventRedDotCmdFromCross extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {

        WingRoomProto.CrossCalEventRedDotRespMsg respMsg = WingRoomProto.CrossCalEventRedDotRespMsg.parseFrom(packet.getBytes());
        player.getModule(WingRoomModule.class).calVisitRedDotFromCross(respMsg.getVisit());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
